package com.yunc.modules.cms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yunc.common.utils.CheckArr;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 类目
 *
 * @author congcong tao
 * @date 2018/6/21 16:58
 */
@TableName("cms_category")
@Data
public class CmsCategory implements Serializable {
	private static final long serialVersionUID = 1L;
	
	/**
	 * ID
	 */
	@TableId(type = IdType.AUTO)
	private Long id;

	/**
	 * 父ID
	 */
	private Long parentId;

	private String code;

	/**
	 * 层级
	 */
	private String level;

	/**
	 * 名称
	 */
	private String name;

	/**
	 * 描述
	 */
	private String description;

	/**
	 * 图标
	 */
	private String icon;

	/**
	 * 类型(1:普通,2:热门...)
	 */
	private String type;

	/**
	 * 别名
	 */
	private String alias;

	/**
	 * 排序
	 */
	private Integer orderNum;

	private Long createUser;

	private Date createTime;

	@TableField(exist = false)
	private Boolean open;

	@TableField(exist = false)
	private Boolean isLast;

	@TableField(exist = false)
	private CheckArr checkArr = new CheckArr("0", "0");

	@JsonInclude(JsonInclude.Include.NON_EMPTY)
	@TableField(exist = false)
	private List<?> children;
}
